package com.imti.mall.model.sms.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class SmsCoupon implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "优惠卷类型；0->全场赠券；1->会员赠券；2->购物赠券；3->注册赠券")
    private Integer type;

    private String name;

    @ApiModelProperty(value = "使用平台：0->全部；1->移动；2->PC")
    private Integer platform;

    @ApiModelProperty(value = "数量")
    private Integer count;

    @ApiModelProperty(value = "金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "每人限领张数")
    private Integer perLimit;

    @ApiModelProperty(value = "使用门槛；0表示无门槛")
    private BigDecimal minPoint;

    private Date startTime;

    private Date endTime;

    @ApiModelProperty(value = "使用类型：0->全场通用；1->指定分类；2->指定商品")
    private Integer useType;

    @ApiModelProperty(value = "备注")
    private String note;

    @ApiModelProperty(value = "发行数量")
    private Integer publishCount;

    @ApiModelProperty(value = "已使用数量")
    private Integer useCount;

    @ApiModelProperty(value = "领取数量")
    private Integer receiveCount;

    @ApiModelProperty(value = "可以领取的日期")
    private Date enableTime;

    @ApiModelProperty(value = "优惠码")
    private String code;

    @ApiModelProperty(value = "可领取的会员类型：0->无限时")
    private Integer memberLevel;

    @ApiModelProperty(value = "指定类别")
    private List<SmsCouponProductCategoryRelation> smsCouponProductCategoryRelationList;

    @ApiModelProperty(value = "指定商品")
    private List<SmsCouponProductRelation> smsCouponProductRelationList;

    public SmsCoupon() {}

    public SmsCoupon(Long id, Integer type, String name, Integer platform, Integer count, BigDecimal amount, Integer perLimit, BigDecimal minPoint, Date startTime, Date endTime, Integer useType, String note, Integer publishCount, Integer useCount, Integer receiveCount, Date enableTime, String code, Integer memberLevel) {
        this.id = id;
        this.type = type;
        this.name = name;
        this.platform = platform;
        this.count = count;
        this.amount = amount;
        this.perLimit = perLimit;
        this.minPoint = minPoint;
        this.startTime = startTime;
        this.endTime = endTime;
        this.useType = useType;
        this.note = note;
        this.publishCount = publishCount;
        this.useCount = useCount;
        this.receiveCount = receiveCount;
        this.enableTime = enableTime;
        this.code = code;
        this.memberLevel = memberLevel;
    }

    public SmsCoupon(Long id, Integer type, String name, Integer platform, Integer count, BigDecimal amount, Integer perLimit, BigDecimal minPoint, Date startTime, Date endTime, Integer useType, String note, Integer publishCount, Integer useCount, Integer receiveCount, Date enableTime, List<SmsCouponProductCategoryRelation> smsCouponProductCategoryRelationList, List<SmsCouponProductRelation> smsCouponProductRelationList) {
        this.id = id;
        this.type = type;
        this.name = name;
        this.platform = platform;
        this.count = count;
        this.amount = amount;
        this.perLimit = perLimit;
        this.minPoint = minPoint;
        this.startTime = startTime;
        this.endTime = endTime;
        this.useType = useType;
        this.note = note;
        this.publishCount = publishCount;
        this.useCount = useCount;
        this.receiveCount = receiveCount;
        this.enableTime = enableTime;
        this.smsCouponProductCategoryRelationList = smsCouponProductCategoryRelationList;
        this.smsCouponProductRelationList = smsCouponProductRelationList;
    }

    public SmsCoupon(Long id, Integer type, String name, Integer platform, Integer count, BigDecimal amount, Integer perLimit, BigDecimal minPoint, Date startTime, Date endTime, Integer useType, String note, Integer publishCount, Integer useCount, Integer receiveCount, Date enableTime, String code, Integer memberLevel, List<SmsCouponProductCategoryRelation> smsCouponProductCategoryRelationList, List<SmsCouponProductRelation> smsCouponProductRelationList) {
        this.id = id;
        this.type = type;
        this.name = name;
        this.platform = platform;
        this.count = count;
        this.amount = amount;
        this.perLimit = perLimit;
        this.minPoint = minPoint;
        this.startTime = startTime;
        this.endTime = endTime;
        this.useType = useType;
        this.note = note;
        this.publishCount = publishCount;
        this.useCount = useCount;
        this.receiveCount = receiveCount;
        this.enableTime = enableTime;
        this.code = code;
        this.memberLevel = memberLevel;
        this.smsCouponProductCategoryRelationList = smsCouponProductCategoryRelationList;
        this.smsCouponProductRelationList = smsCouponProductRelationList;
    }

}
